package com.coldchain.message.core.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * @ClassName IMMessage
 * @Description TODO
 * @Author fangliai
 * @Date 2018/9/20 16:45
 * @Vesion 1
**/
public class Message<T> implements Serializable {
    private String messageId= UUID.randomUUID().toString().replaceAll("-","");
    private T content;
    private Integer msgType;
    private Long sendTime;
    
    public Message() {} ;
    public Message(T content, Integer msgType) {
		super();
		this.content = content;
		this.msgType = msgType;
		this.sendTime=new Date().getTime();
	}

	public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public T getContent() {
        return content;
    }

    public void setContent(T content) {
        this.content = content;
    }

    public Integer getMsgType() {
        return msgType;
    }

    public void setMsgType(Integer msgType) {
        this.msgType = msgType;
    }

    public Long getSendTime() {
        return sendTime;
    }

    public void setSendTime(Long sendTime) {
        this.sendTime = sendTime;
    }
}
